package com.lemon.exam.controller;

import com.lemon.exam.common.annotation.Web;
import com.lemon.exam.common.crud.BaseController;
import com.lemon.exam.entity.po.MenuPO;
import com.lemon.exam.entity.vo.MenuSelectVO;
import com.lemon.exam.service.IMenuService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 菜单表 控制器
 *
 * @author Lemon
 * @since 2025/04/04 14:23:21
 */
@RestController
@RequestMapping("menu")
@Tag(name = "菜单管理", description = "菜单表 API")
@Web(childUri = "menu", childComponent = "system/Menu.vue")
public class MenuController extends BaseController<MenuPO, Long, IMenuService> {
    /**
     * 当点击详情，编辑，修改时，查询
     *
     * @return
     */
    @GetMapping("findSelect")
    @Operation(summary = "查询选择信息", description = "菜单名称")
    public Mono<MenuSelectVO> findSelect() {
        return service.findSelect();
    }
}
